package cn.openea.perpartner.meily.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.openea.perpartner.meily.web.entity.TaskHall;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (MerryTaskHall)表数据库访问层
 *
 * @author Weird077
 * @since 2022-12-01 18:22:45
 */
@Repository
public interface TaskHallMapper extends BaseMapper<TaskHall> {

    @Select("select * from meily_task_hall where task_current_id in (" +
            " select id from meily_provide_samples a left join meily_goods b on a.goods_id = b.goods_id where b.enterprise_no = #{enterpriseNo} " +
            ") ORDER BY create_time DESC ")
    List<TaskHall> getListByEnterpriseNo(@Param("enterpriseNo") String enterpriseNo);
}

